// api/payment.js
import request from '@/utils/request';
import qs from 'qs';

export const setPaymentPin = (data) => {
    const formData = qs.stringify(data);
    return request.post('/api/user/wallet/setPin.do', formData, {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const adminRecharge = (data) => {
    const formData = qs.stringify(data);
    return request.post('/api/admin/payment/recharge.do', formData, {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const adminManageWallet = (data) => {
    const formData = qs.stringify(data);
    return request.post('/api/admin/payment/manageWallet.do', formData, {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const getWalletInfo = () => request.get('/api/user/wallet/info.do', {
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
    }
});